use framework "Foundation"tell application "System Events"	tell process "TextEdit"		set frontmost to true	end tell	repeat		keystroke "1"		delay 0.05		set flag to my BWAND((current application's NSEvent's modifierFlags()), (current application's NSCommandKeyMask)) > 0		if flag is true then exit repeat	end repeatend tellon BWAND(__int1, __int2)	set theResult to 0	repeat with bitOffset from 30 to 0 by -1		if __int1 div (2 ^ bitOffset) = 1 and __int2 div (2 ^ bitOffset) = 1 then			set theResult to theResult + 2 ^ bitOffset		end if		set __int1 to __int1 mod (2 ^ bitOffset)		set __int2 to __int2 mod (2 ^ bitOffset)	end repeat	return theResult as integerend BWAND